home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / Caml Light 0.7 / Caml Light 0.7 source / INSTALL (src) < prev    next >
Text File  |  1995-07-05  |  4KB  |  95 lines

  1.  
  2.                RECOMPILING CAML LIGHT ON A MACINTOSH WITH MPW
  3.  
  4.  
  5. To recompile Caml Light, you need at least a Macintosh II with 4 megabytes
  6. of RAM, 10 megabytes of hard disk space, and MPW version 3.3.1 or 3.4b2.
  7. You also need at least one C compiler (not necessarily Apple's compiler).
  8.  
  9. The configuration file contains pre-written configurations for the
  10. following compilers:
  11. - Apple's old compilers (C and PPCC)
  12. - Apple's new compiler (MrC)
  13. - Metrowerks' compilers (MWC68k and MWCPPC)
  14.     If you use MWC68k from CodeWarrior 6, you will need to apply
  15.     the patches found in the folder ":src:For Metrowerks Users".
  16. - Symantec's compiler for 68k (SC, versions 7.0.3 and 7.0.5b2)
  17.  
  18.  
  19. 1- Edit the file :src:config. Change the variable definitions to where
  20.    to install the files and which C compilers to use.  See the instructions
  21.    in the file itself for more details.
  22.  
  23. 2- Set your "Commands" variable to include the folder :src:tools:
  24.    (put the absolute path name of this folder into "Commands").
  25.  
  26. 3- From the :src: folder, type:
  27.  
  28.         do make world
  29.  
  30. This builds all components of Caml Light for the first time. It takes
  31. at least fifteen minutes.  Ignore all warnings and error messages, unless
  32. the "make" process stops.  The "make" ends up with a little self-test.
  33. Don't forget to check the results, as indicated.
  34.  
  35. 4- To be sure everything works well, you can try to bootstrap the
  36. system --- that is, to recompile all Caml Light sources with the newly
  37. created compiler.  From the :src: folder, type:
  38.  
  39.         do make bootstrap
  40.  
  41. This takes slightly less time than the "make world" phase. The "make
  42. bootstrap" checks that the bytecode programs compiled with the new
  43. compiler are identical to the bytecode programs compiled with the old
  44. compiler. If this is the case, you can be pretty sure the Caml Light
  45. system has been correctly compiled. Otherwise, this does not
  46. necessarily means something went wrong. The best thing to do is to try
  47. a second bootstrapping phase: just "do make bootstrap" again.  It will
  48. either crash almost immediately, or re-re-compile everything correctly
  49. and reach the fixpoint.
  50.  
  51. 5- You can now install the Caml Light system. This will create the
  52. following commands (in the directory set to BINDIR in :src:config):
  53.  
  54.         camllight       the interactive, toplevel-based tool
  55.         camlc           the batch compiler
  56.         camlrun         the runtime system
  57.         camlyacc        the parser generator
  58.         camllex         the lexer generator
  59.         camlmktop       a tool to make toplevel systems that integrate
  60.                         user-defined C primitives
  61.  
  62. From the :src: directory, type "do make install".
  63.  
  64. 6- The directory where camlrun resides must be in the "Commands" variable
  65. for camlc and camllight to work properly. (Actually, camlc and
  66. camllight are shell-scripts that call "camlrun" on various
  67. bytecode files.) Hence, if you have installed camlrun in a
  68. non-standard directory, be careful to add it to the "Commands" variable
  69. before running camlc or camllight.
  70.  
  71. 7- The tools and libraries from the contrib/ directory in the Unix
  72. version of Caml Light have not been ported to the Mac yet.  Some of
  73. them will be, at some point in the future.
  74.  
  75. 8- Installation is complete. Time to clean up.  Type "do make clean"
  76.    in the :src: directory.
  77.  
  78.  
  79. COMMON PROBLEMS:
  80.  
  81. * If you're hacking the source and recompiling often, and you find that
  82.   "make depend" is too slow for your taste, and if you have MPW Perl and Sed
  83.   on your Mac, you can try to adapt the files found in the folder
  84.   ":src:From Franklin Chen".
  85.  
  86. * camlc or camllight complain that camlrun cannot be found. Make sure
  87.   that the directory containing camlrun is in your "Commands" variable
  88.   (see point 6- above).
  89.  
  90. * You can safely ignore the various warnings given by the C compiler and
  91.   linker.
  92.  
  93. * If you have a Macintosh under A/UX or MachTen, you should use the Unix
  94.   version of Caml Light.
  95.